<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt"  uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title><spring:message code="index.show"></spring:message></title>
    <link href="${pageContext.request.contextPath }/phone/css/font/iconfont.css" rel="stylesheet" type="text/css" />
    <!--公共样式-->
    <link href="${pageContext.request.contextPath }/phone/css/public.css" rel="stylesheet" type="text/css" />
    <!--秀场追踪样式-->
    <link href="${pageContext.request.contextPath }/phone/css/show.css" rel="stylesheet" type="text/css" />

</head>
<body>
<!--头部 begin-->
<header class="page_topbar">
    <a href="javascript:history.go(-1);" class="back Hui-iconfont"></a>
    <div class="title"><spring:message code="index.show"></spring:message></div>
</header>
<!--头部 end-->
<div class="content">
    <!--秀场追踪 begin-->
    <div class="index-show-right">
        <div class="containershowzhuiz">
            <ul class="change_prod cont">
            	<c:set var="c" value="0"></c:set>
	            <c:forEach items="${showList }" var="s" varStatus="show">
		            <c:if test="${s.parentId==0 }">
		            	<li <c:if test="${c==0 }">class="on"</c:if>>${s.name }</li>
		            	<c:set var="c" value="${c+1 }"></c:set>
		            </c:if>
	            </c:forEach>
            </ul>
        </div>
        <c:set var="c1" value="0"></c:set>
        <c:forEach items="${showList }" var="s1">
	        <c:if test="${s1.parentId==0 }">
	        <div class="change_prod_cont <c:if test="${c1==0 }">on</c:if>">
	            <!-- 兼容IE6 加clear:both;-->
	            <ul class="index-show-right-list" id="show${c1 }" style="clear:both;">
		            <c:forEach items="${showList }" var="s2">
			            <c:if test="${s2.parentId == s1.id }">
			                <li>
			                	<a href="${pageContext.request.contextPath }/api/show/details?sId=${s2.id}" onfocus="blur();">${s2.name }</a>
			               	</li>
			           	</c:if>
		           	</c:forEach>
	            </ul>
	        </div>
	        <c:set var="c1" value="${c1+1 }"></c:set>
	        </c:if>
        </c:forEach>
    </div>

    <div class="clearfix"></div>
    <!--秀场追踪 end-->
    
<script src="${pageContext.request.contextPath }/phone/js/jquery-1.8.3.min.js"></script>
    <jsp:include page="../main/bottom.jsp" flush="true"><jsp:param name="bottom" value="2"/></jsp:include>
</div>

</body>
<script type="text/javascript">
    /**
     * Created by 刘晓鑫 on 2016/8/2 首页私有js
     */
    $(document).ready(function () {
        //tab
        //:eq() 选择器选取带有指定 index 值的元素。
        //index 值从 0 开始，所有第一个元素的 index 值是 0（不是 1）
        //siblings() 获得匹配集合中每个元素的同胞，通过选择器进行筛选是可选的。
        //秀场同步tab
        $(".index-show-right .change_prod li").click(function () {
            $(".index-show-right .change_prod li").eq($(this).index()).addClass("on").siblings().removeClass('on');
            $(".index-show-right .change_prod_cont").removeClass('on').eq($(this).index()).addClass("on")
        });
    });
   
</script>
</html>